-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: better logging #62
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for disworse ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the place of configs. A separate config module is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bassiounix This is a feature request, we can create a separate issue for this.
The intention of this PR is to add logging, not create a config module.
BaseContext, | ||
GraphQLRequestContext, | ||
GraphQLRequestContextWillSendResponse, | ||
GraphQLRequestListener, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
GraphQLRequestListener, | |
Remove `GraphQLRequestListener` |
export class ApolloLogger implements ApolloServerPlugin { | ||
private readonly logger = new Logger("GraphQL"); | ||
|
||
async requestDidStart(requestContext: GraphQLRequestContext<BaseContext>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark full access specifier as the logger
async requestDidStart(requestContext: GraphQLRequestContext<BaseContext>) { | |
public async requestDidStart(requestContext: GraphQLRequestContext<BaseContext>) { |
@@ -26,7 +30,10 @@ export class TransactionInterceptor implements NestInterceptor { | |||
const gqlContext = GqlExecutionContext.create(context); | |||
const ctx = gqlContext.getContext(); | |||
|
|||
const db = drizzle(this.pool, { schema }); | |||
const db = drizzle(this.pool, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the db is not injected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya 3ammena, separate issue wallah 😭 See #2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. However, I didn't try to run logs locally!
This will be needed by #57.